Animations in Blender always work in a linear direction, where you
define a Start and End frames for them. During playback, the animation
begins and ends based on those two frames. However, using a special
feature of the Graph Editor, it is possible to make any motion to loop
forever or with a defined number of repetitions.
To make an animation loop, you must create the motion first and prepare
it to use a loop. For instance, if you want to make an object go back and
forward forever, you should work in a way that your last frame uses the
same property location value as the first frame.
That way, your motion always ends at the starting point. Ready to begin
again!
An excellent way to make animations that shares the first and last
positions with the same property values is to add all keyframes before
applying any motion. In Figure 8.4, we have an object that we can
animate by making it scale up and down.